#include <iostream>

/**
 * PAT A 1104 Sum of Number Segments
 * This solution got wrong answer on one case. It is very likely that the
 * difference is caused by evaluation order.
 */

int main() {
    int num;
    double added = 0, sum = 0;
    scanf("%d", &num);
    for (int i = 0; i < num; i++) {
        double val;
        scanf("%lf", &val);
        added += (i + 1) * val;
        sum += added;
    }
    printf("%.2f", sum);
}